﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page isELIgnored="false" %>
<html>
<head>
    <meta charset="UTF-8"/>
    <title>新闻发布后台登陆</title>
    <link href="${pageContext.request.contextPath}/static/css/style.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="${pageContext.request.contextPath}/static/js/jquery-1.12.4.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/cloud.js" type="text/javascript"></script>

<script language="javascript">
	$(function(){
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
	$(window).resize(function(){  
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
    })  
});  
</script> 

</head>

<body style="background-color:#1c77ac; background-image:url(${pageContext.request.contextPath}/static/images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">
    <div id="mainBody">
      <div id="cloud1" class="cloud"></div>
      <div id="cloud2" class="cloud"></div>
    </div>  
	<div class="logintop">    
    <span>新闻发布后台</span>
    </div>
    
    <div class="loginbody">
    <%--<span class="systemlogo"></span> --%>

    <form name="form1" action="/checkLogin" method="post">
        <div class="loginbox">
            <ul>
                <li><input name="username" type="text" class="loginuser" placeholder="账户" /></li>
                <span >${spanName}</span>
                <li><input name="password" type="text" class="loginpwd" placeholder="密码" /></li>
                <span>${spanPassWord}</span>
                <li><input type="button" class="loginbtn"  value="登录"  /></li>
            </ul>
        </div>
    </form>
    </div>
    <div class="loginbm">版权所有  2018  .com 仅供学习交流，勿用于任何商业用途</div>
</body>
</html>

<script >
    $(document).ready(function () {
        $('.loginbtn').click(function () {
            if(($('.loginuser').val())==null ||($('.loginuser').val()) ==''.trim()){
                alert("用户名不能为空")
                return;
            }
            if (($('.loginpwd').val())==null || ($('.loginpwd').val())==''.trim()){
                alert("密码不能为空")
                return;
            }

            document.form1.submit();
        });
    })

</script>
